<template>
    <div>
        <h3>Child--->num:{{num}}</h3>
        <h3>Child--->no:{{no}}</h3>
        <button @click="handle" >加一</button>
    </div>
</template>

<script>
export default {
    name: "Child",
    props:['no'],
    data(){
        return {
            num:1
        }
    },
    methods:{
        handle(){
            this.$emit('addNum',this.num)
        }
    }
}
</script>

<style scoped>

</style>